{include file="stddecor.form.open.tpl" }
<table cellspacing="0" class="objHeader">
<tr>
    <td class="objHeader-td-icon"><img src="{$SPIcfg.dir.pubsite_styles|escape}manage/image/topic_icons/{$data.topic|escape}.gif" /></td>
    <td class="objHeader-td-header">
        <div>
            <h1>{$data.title|escape}</h1>
            <h2>{$data.subtitle|escape}</h2>
        </div>

        <div class="objHeader-action_buttons">
            {if $data.link_newitem }<div>{include file="obj.button.tpl" name="Создать нового пользователя" link=$data.link_newitem icon="new" }</div>{/if}

            <div>
                {if $data.link_sort_dj }<div class="left" style="padding-right:10px;">{include file="obj.button.tpl" name="Сортировать 'Диджеев'" link=$data.link_sort_dj icon="order" }</div>{/if}
                {if $data.link_sort_info }<div class="left">{include file="obj.button.tpl" name="Сортировать 'Службу информации'" link=$data.link_sort_info icon="order" }</div>{/if}
            </div>
            <br class="clear" />
        </div>
    </td>

    {if $content.stdobj.f_permissions }
        <td width="200" style="padding-right: 5px;">{include file="stdobj.filter.select.tpl" title="Тип профиля" filter_vars=$content.stdobj.f_permissions }</td>
    {/if}
    {if $content.stdobj.f_workstatus }
        <td width="160" style="padding-right: 5px;">{include file="stdobj.filter.select.tpl" title="Активность" filter_vars=$content.stdobj.f_workstatus }</td>
    {/if}
    <td width="160">{include file="stdobj.filter.text.tpl" title="Поиск" filter_vars=$content.stdobj.f_search }</td>
</tr>
</table>
{include file="stddecor.form.close.tpl" }

{* ************************************************************************* *}

{if $data.items }
    <form name="FormFields" method="post" action="{$data.link_form_submit|escape}">
    {foreach from=$data.formvars key=varname item=varvalue }
    <input type="hidden" name="{$varname|escape}" value="{$varvalue|escape}" />
    {/foreach}

    {foreach from=$data.items item=item name=list }

        {if $item.workstatus=='0' || $item.workstatus=='2' }
            <div style="padding: 7px;">
            <div style="padding: 8px; border:1px solid #cccccc; {if $item.workstatus=='0' }background-color: #f0f0f0;{elseif $item.workstatus=='2' }background-color: #fdffa3;{/if}">
        {else}
            {include file="stddecor.form.open.tpl" }
        {/if}

        <table cellspacing="0" cellpadding="8" width="100%" height="70">
        <tr valign="top">
            <td width="30" class="small light">{$smarty.foreach.list.iteration}</td>
            <td width="76" align="center">
                {if $item.preview }
                    <img src="{$item.preview|spiMediaPreview:70:70|escape}" width="70" height="70" style="border: 3px solid #cccccc;" />
                {else}
                    <div class="small light" style="padding-top:23px;">нет фото</div>
                {/if}
            </td>

            <td>
                <div class="nl_mini">
                    {if $item.workstatus=='0' || $item.workstatus=='2' }
                        <div><h1><s>{$item.fname|escape} {$item.lname|escape}</s></h1></div>
                    {else}
                        <div><h1>{$item.fname|escape} {$item.lname|escape}</h1></div>
                    {/if}
                    <div class="light small">{$item.email|escape}</div>
                </div>

                <table cellspacing="0" cellpadding="0">
                <tr>
                    <td class="small">{$item.phpbb_forum_username|escape}</td>
                </tr>
                <tr>
                    <td width="110" class="light small"><b>Права:</b></td>
                    <td class="small">
                        {foreach from=$data.list_permissions key=perm_key item=perm_name }
                        {if $item.permissions_keys.$perm_key === true }{$perm_name|escape} <span class="light">|</span>{/if}
                        {/foreach}
                    </td>
                </tr>
                </table>
            </td>

            <td width="180" style="border-left: 1px solid #d0d0d0;">
                <div class="nl_mini">
                    {if ! $item.__is_self_profile }
                        <div class="right"><input type="checkbox" name="multiselect[]" class="multiselect" value="{$item.id|escape}" /></div>
                    {/if}

                    <div>
                        {if $item.link_activity_on }<a href="{$item.link_activity_on|escape}"><img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_activity_off" title="Элемент не активен. Включить элемент" /></a>{/if}
                        {if $item.link_activity_wait2on }<a href="{$item.link_activity_wait2on|escape}"><img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_activity_wait" title="Элемент ожидает активации. Включить элемент" /></a>{/if}
                        {if $item.link_activity_off }<a href="{$item.link_activity_off|escape}"><img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_activity_on" title="Элемент активен. Выключить элемент" /></a>{elseif $item.link_activity_off === false }<img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon" />{/if}
                        {if $item.link_modify }<a href="{$item.link_modify|escape}"><img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_modify" title="Редактировать" /></a>{/if}
                        {if $item.link_delete }<a href="{$item.link_delete|escape}" onClick="return(actionConfirm_Delete());"><img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_delete" title="Удалить" /></a>{elseif $item.link_delete === false }<img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon" />{/if}
                    </div>
                </div>
                <div class="clear small light">ID #{$item.id}</div>
                <br class="clear" />
            </td>
        </tr>
        </table>

        {if $item.workstatus=='0' || $item.workstatus=='2' }
            </div></div>
        {else}
            {include file="stddecor.form.close.tpl" }
        {/if}
    {/foreach}

    {include file="stddecor.form.open.tpl" }
    <table cellspacing="0" cellpadding="0" width="100%">
    <tr>
        <td>{include file="stdobj.pager.tpl" pager=$content.stdobj.pager }</td>
        <td width="180" style="padding-left: 10px; border-left: 1px solid #d0d0d0;">
            <input type="hidden" name="action_do" value="" />
            <div class="right"><input type="checkbox" onclick="selectAllMultiselectValues(this.checked)" /></div>
            <div class="nl_mini">Групповые действия:</div>
            <div class="block_actions">
                <input type="image" src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_activity_on" title="Включить выбранные элементы" onClick="return(actionConfirm_GroupActivityOn());" />
                <input type="image" src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_activity_off" title="Выключить выбранные элементы" onClick="return(actionConfirm_GroupActivityOff());" />
                <input type="image" src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="icon icon_delete" title="Удалить выбранные элементы" onClick="return(actionConfirm_GroupDelete());" />
            </div>
            <br class="clear" />
        </td>
    </tr>
    </table>
    {include file="stddecor.form.close.tpl" }

    </form>
{else}

    {include file="stddecor.form.open.tpl" }
    <div class="cntView_ListIsEmpty">
        {if $content.stdobj.f_search.value }
            <div class="bold">Элементы по вашему запросу отсутствуют</div>
            <div class="bold">Попробуйте задать более "мягкий" поиск</div>
        {else}
            <div class="bold">Элементы отсутствуют</div>
        {/if}

        <div class="action_buttons">
            <div>{if $data.link_newitem }{include file="obj.button.tpl" name="Создать нового пользователя" link=$data.link_newitem icon="new" }{/if}</div>
        </div>
    </div>
    {include file="stddecor.form.close.tpl" }

{/if}

{* ************************************************************************* *}
